/**
 * 
 */
package com.rpg.base.flyweight;

import com.rpg.base.interactive.flyweight.BaseInteractiveObject;

/**
 * @author Donald
 */
public abstract class IONPCData<IO> {
	float			absorb;
	long			aiming_start;
	float			aimtime;
	float			armor_class;
	float			armorClass;
	float			backstab_skill;
	long			behavior;
	float			behavior_param;
	float			climb_count;
	long			collid_state;
	long			collid_time;
	float			critical;
	long			cut;
	short			cuts;
	float			damages;
	long			detect;
	float			fDetect;
	long			fightdecision;
	float			lastmouth;
	float			life;
	float			look_around_inc;

	long			ltemp;
	float			mana;
	float			maxlife;
	float			maxmana;
	long			movemode;
	float			moveproblem;
	/** all NPC flags. */
	private long	npcFlags;
	// IO_PATHFIND pathfind;
	// EERIE_EXTRA_ROTATE * ex_rotate;
	// D3DCOLOR blood_color;
	char			padd;
	// IO_BEHAVIOR_DATA stacked[MAX_STACKED_BEHAVIOR];
	float			poisonned;
	float			reach;
	long			reachedtarget;					// Is target in REACHZONE ?
	long			reachedtime;
	char			resist_fire;

	char			resist_magic;
	char			resist_poison;
	float			speakpitch;
	float			stare_factor;

	short			strike_time;
	long			tactics;						// 0=none ; 1=side ;
													// 2=side+back
	float			tohit;
	short			unused;
	// EERIE_3D last_splat_pos;
	float			vvpos;

	short			walk_start_time;
	/** the NPC's weapon. */
	private IO		weapon;
	long			weaponinhand;
	char[]			weaponname	= new char[256];
	long			weapontype;
	int				xpvalue;
	private int splatDamages;
	/**
	 * Gets the splatDamages 
	 * @return {@link int}
	 */
	public int getSplatDamages() {
		return splatDamages;
	}
	/**
	 * Sets the splatDamages
	 * @param splatDamages the splatDamages to set
	 */
	public void setSplatDamages(int val) {
		this.splatDamages = val;
	}
	/**
	 * Gets the splatTotNb 
	 * @return {@link int}
	 */
	public int getSplatTotNb() {
		return splatTotNb;
	}
	/**
	 * Sets the splatTotNb
	 * @param splatTotNb the splatTotNb to set
	 */
	public void setSplatTotNb(int val) {
		this.splatTotNb = val;
	}
	private int splatTotNb;
	/**
	 * Adds an NPC flag.
	 * @param flag the flag
	 */
	public final void addNPCFlag(final long flag) {
		npcFlags |= flag;
	}
	/** Clears all NPC flags that were set. */
	public final void clearNPCFlags() {
		npcFlags = 0;
	}
	/**
	 * Gets the armorClass
	 * @return {@link float}
	 */
	public float getArmorClass() {
		return armorClass;
	}

	/**
	 * Gets the NPC's weapon.
	 * @return {@link IO}
	 */
	public final IO getWeapon() {
		return weapon;
	}
	/**
	 * Determines if the {@link IONPCData} has a specific flag.
	 * @param flag the flag
	 * @return true if the {@link IONPCData} has the flag; false
	 *         otherwise
	 */
	public final boolean hasNPCFlag(final long flag) {
		return (npcFlags & flag) == flag;
	}
	/**
	 * Removes an NPC flag.
	 * @param flag the flag
	 */
	public final void removeNPCFlag(final long flag) {
		npcFlags &= ~flag;
	}
	/**
	 * Sets the armorClass
	 * @param armorClass the armorClass to set
	 */
	public void setArmorClass(float armorClass) {
		this.armorClass = armorClass;
	}
	/**
	 * Sets the NPC's weapon.
	 * @param io the weapon to set
	 */
	public final void setWeapon(final IO io) {
		weapon = io;
	}
}
